Skip to content

[Agent Archiving] Payables and Expense agent implementation for IAgentArchiving - #10460

Open
krupybalu wants to merge 7 commits into
mainfrom
private/bkrupinszki/agent-archiving-opt-out
Open

[Agent Archiving] Payables and Expense agent implementation for IAgentArchiving#10460
krupybalu wants to merge 7 commits into
mainfrom
private/bkrupinszki/agent-archiving-opt-out

Conversation

@krupybalu

@krupybalu krupybalu commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

What & why

Honours the new IAgentArchiving interface, and opts Payables Agent and Expense Agent out of archiving.

The Archive action is disabled on the Agent List and Agent Card for agent types that do not support archiving, and Agent.Archive blocks it programmatically so the guard cannot be bypassed. The check runs off the record the pages already hold, so it costs no extra read and cannot fail on an unsaved record.

Payables and Expense opt out via their own PA Agent Archiving / EA Agent Archiving codeunits, mirroring how each app already registers IAgentTaskExecution, so they can be removed cleanly once each agent supports archiving. Both are single-instance: the setup record enforcing that is left behind by archiving, which would block creating a replacement.

Behaviour is unchanged for every agent type that does not opt out.

Linked work

AB#647379

Related PRs

Cross-repo change - merge in this order:

  1. BC-Platform - the interface: https://microsoft.ghe.com/bic/BC-Platform/pull/46005
  2. BCApps - System App honours it, Payables and Expense opt out (this PR): [Agent Archiving] Payables and Expense agent implementation for IAgentArchiving #10460

Note: this PR will not build until 1 is merged and a platform version carrying IAgentArchiving flows through.

@krupybalu
krupybalu requested review from a team August 20, 2026 14:51
@krupybalu
krupybalu requested a review from a team as a code owner August 20, 2026 14:51
@github-actions github-actions Bot added AL: System Application AL: Apps (W1) Add-on apps for W1 Team: Other GitHub request for other area than SCM, Finance or Integration Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction labels Aug 20, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Aug 20, 2026
@krupybalu krupybalu changed the title [Agent Archiving] Honour IAgentArchiving and opt Payables Agent out [Agent Archiving] Payables Agent opt-out Aug 20, 2026
Comment thread src/System Application/App/Agent/Setup/AgentImpl.Codeunit.al
@krupybalu krupybalu changed the title [Agent Archiving] Payables Agent opt-out [Agent Archiving] Honour IAgentArchiving and opt Payables and Expense Agent out Aug 20, 2026
@krupybalu krupybalu changed the title [Agent Archiving] Honour IAgentArchiving and opt Payables and Expense Agent out [Agent Archiving] Payables and Expense agent implementation for IAgentArchiving Aug 20, 2026
Comment thread src/System Application/App/Agent/Setup/AgentImpl.Codeunit.al
Comment thread src/System Application/App/Agent/Setup/AgentImpl.Codeunit.al Outdated
Comment thread src/System Application/App/Agent/Setup/AgentImpl.Codeunit.al Outdated
Comment thread src/System Application/App/Agent/Setup/AgentCard.Page.al Outdated
Comment thread src/Apps/W1/PayablesAgent/app/Integration/PAAgentArchiving.Codeunit.al Outdated
Comment thread src/System Application/App/Agent/Setup/AgentImpl.Codeunit.al
Comment thread src/System Application/App/Agent/Setup/AgentCard.Page.al
Comment thread src/System Application/App/Agent/Setup/AgentList.Page.al
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9724257d-43d1-468b-9f97-1fb863d2fdd1
Comment thread src/System Application/App/Agent/Setup/AgentImpl.Codeunit.al
@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟡\ Medium\ Severity\ —\ Style}$

The changed file src/System Application/Test/Agent/src/Setup/LibraryMockAgent.codeunit.al does not follow the <ObjectName>.<ObjectType>.al convention from the style guidance: the type segment is written as codeunit instead of Codeunit. Rename it to LibraryMockAgent.Codeunit.al so file listings and tooling can map the object name and type reliably.

Knowledge:

Line mapping was unavailable, so this was posted as an issue comment.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.35.4

Comment thread src/System Application/Test/Agent/src/SDK/AgentTest.Codeunit.al Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 9724257d-43d1-468b-9f97-1fb863d2fdd1
@github-actions

Copy link
Copy Markdown
Contributor

$\textbf{🟡\ Medium\ Severity\ —\ Style}$

The changed file src/System Application/Test/Agent/src/Setup/LibraryMockAgent.codeunit.al does not follow the ..al naming pattern because the type segment is lowercase ('codeunit' instead of 'Codeunit'). Rename it to LibraryMockAgent.Codeunit.al so the filename matches codeunit 'Library Mock Agent' and stays consistent with tooling/grep expectations used across the repo.

Knowledge:

Line mapping was unavailable, so this was posted as an issue comment.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.35.4

Comment thread src/System Application/Test/Agent/src/SDK/AgentTest.Codeunit.al
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1 AL: System Application Ownership: Needs Review Ownership is Other, low confidence, or needs manual correction Team: Other GitHub request for other area than SCM, Finance or Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants